

const url = import.meta.env.MODE === 'development' ? '/config.json' : '/learn/config.json';
var localversion = ""
onmessage = async (e) => {
    const flag = e.data;
    if (flag === 'start') {
        setInterval(async () => {
            const data = await fetch(url).then((res) => {
                return res.json();
            });
            console.log(data);
             postMessage(data)
        }, 1000);
    }
}